<template>
    <div class="top-bar__logo" >
        <div class="top-bar__logobox" >  
            <img class="top-bar__logo_img" :src="logoimg" >
            <!--<p v-if="!isCollapse || this.appConfig.theme.nav != 'side'" class="top-bar__logo--title-text" >{{appConfig.title}}</p>-->
            <p v-if="isShowProject" class="top-bar__logo--title-text" >{{appConfig.title}}-{{project.f_Name}}</p>
            <p v-else class="top-bar__logo--title-text" >{{appConfig.title}}</p>

            <el-button v-if="isShowProject" @click="handleOpenProject" type="text" icon="el-icon-more"></el-button>
        </div>
    </div>
</template>
<script>
import { mapGetters } from "vuex"
export default {
  name: "top-logo",
  props:{
    isShowProject:{
      type:Boolean,
      default:true
    }
  },
  data () {
    return {};
  },
  created () {
  },
  mounted () { },
  computed: {...mapGetters(["isCollapse",'project']),
    logoimg(){
        return `${this.rootUrl}img/admin/logo1.svg`
    }
  },
  methods: {
    handleOpenProject(){
      this.$router.push({ path: '/tool/project/index'})
    },
  }
};
</script>

<style lang="scss" scoped>
.top-bar__logo--title-text {
    height: 32px;
    line-height: 32px;
    vertical-align: middle;
    margin: 0 0 0 12px;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
}
</style>
